Objective - Students will become familiar with basic computer programming terminology (HyperTalk, Scripting, Syntax).
BASIC
Computer Programming used to be very difficult. Most computer programs used to look like random numbers and letters to the untrained eye.
Then came a programming language called “BASIC”. BASIC was the first computer programming language that read like english. Look at the following BASIC program:
10 put 4 into a
20 if a = 4 then go to line 40
30 go to line 10
40 end
BASIC changed the way people programmed. But it was not powerful enough to do many things, and it too k hundreds of lines of code to make a worthwhile program.
HyperTalk
HyperCard, a program for that Mac that allows people to make their own computer programs, uses a computer programming language called HyperTalk. HyperTalk is very powerful, yet it is oneof the easiest programming language to learn. HyperTalk is the language we will be learning.
Scripts and Scripting
In HyperTalk, a script refers to a small program written in HyperTalk. Just like an actress follows a script on stage, the computer will follow your script! A script, which is a computer program, is a set of directions for the computer to follow. If you give someone bad directions, they will get lost. If you give a computer bad directions, it not do what you want it to. In some cases, it will tell you that your directions are bad.
Syntax
Syntax is to HyperTalk what grammar is to the english language. Syntax is the exact wording of scripts. In HyperTalk, one wrong letter can totally change the function of a script, making it do somet •hing weird, or not do anything at all!
Question - Why did BASIC change the way people programmed?
Question - What is a “Script”?
Question - What will happen if you write a script with an error in it? Question - What is “Syntax?”
Lesson Two - The “Add” Command
Objective - Students will define a “card field”, understand how the “add” command works, and write scripts utilizing the “add” command.
Read the following script:
on mouseUp
put 8 + 2 into card field “a”
end mouseUp
Type the above script into Student Programmer, and then run it. Student Programmer will put the number 10 into card field “a”. Card fields are areas on the screen where text can